package com.woniuxy.cloud.batteryassembly.controller;


import com.woniuxy.cloud.api.BatteryDamageApi;
import com.woniuxy.cloud.batteryassembly.service.IBatteryDamageService;
import com.woniuxy.cloud.demo.Result;
import com.woniuxy.cloud.dto.DamageDto;
import com.woniuxy.cloud.param.DamageParam;
import com.woniuxy.cloud.param.ListDamageParam;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author gaorui
 * @since 2022-02-09
 */
@RestController
public class BatteryDamageController implements BatteryDamageApi {

    @Resource
    private IBatteryDamageService batteryDamageService;

    @Override
    public Result<List<DamageDto>>  listDamageMessage(ListDamageParam param) {
        return Result.newInstance().setCode(200).setMsg("查询成功").setData(batteryDamageService.listDamageMessage(param));
    }
}

